package com.example.spider.proxy.core.tester;

import com.example.spider.proxy.core.ProxyInfo;

import java.util.Map;

/**
 * 代理测试回调如何处理
 */
public interface TestCallBack {

    String getAimUrl(ProxyInfo proxyInfo);

    Map<String, String> getHeaders();

    boolean onResponse(ProxyInfo proxyInfo, int responseCode, String responseStr, long costTime);

    boolean onException(ProxyInfo proxyInfo, long costTime, Exception e);

    default void onFinally() {
    }

}